using System;
using System.Threading.Tasks;
using JlPay.Sdk.Core;
using JlPay.Sdk.Models.Openmerch.Alipay;

namespace JlPay.Sdk.Services.Openmerch.Alipay
{
    /// <summary>
    /// 开放商户支付宝服务
    /// </summary>
    public class AlipayService : BaseService
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="config">配置对象</param>
        public AlipayService(Config config) : base(config)
        {
        }

        /// <summary>
        /// 查询支付宝实名认证信息
        /// </summary>
        /// <param name="request">请求对象</param>
        /// <returns>响应对象</returns>
        public async Task<RealnameAliQueryResponse> QueryRealnameAliAsync(RealnameAliQueryRequest request)
        {
            return await PostAsync<RealnameAliQueryRequest, RealnameAliQueryResponse>(request, RealnameAliQueryRequest.API_URL);
        }
    }
} 